<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="./../templates/StakeholderPortalTemplate.xhtml">

    <ui:define name="content"> 
        <f:view beforePhase="#{stakeholderManagerBean.initBranchList}"></f:view>  
            <h:form id="formMain">
                <h1>Stakeholder View All Branch</h1>         

                <p:panel header="View All Branch">
                    <p:accordionPanel autoHeight="false">
                        <p:tab title="F and B Branches">
                            <p:dataTable var="fnBBranch" value="#{stakeholderManagerBean.fnBBranchList}" paginator="true" 
                                         rows="10" emptyMessage="No F and B Branch" selection="#{stakeholderManagerBean.selectedBranch}" 
                                         selectionMode="single" rowSelectListener="#{stakeholderManagerBean.onRowSelectNavigateFnBBranch}"
                                         dblClickSelect="true">

                                <p:column sortBy="#{fnBBranch.id}" filterBy="#{fnBBranch.id}">
                                    <f:facet name="header">
                                        <h:outputText value="ID" />
                                    </f:facet>
                                    <h:outputText value="#{fnBBranch.id}" />
                                </p:column>
                                <p:column sortBy="#{fnBBranch.name}" filterBy="#{fnBBranch.name}">
                                    <f:facet name="header">
                                        <h:outputText value="Username" />
                                    </f:facet>
                                    <h:outputText value="#{fnBBranch.name}" />
                                </p:column>
                                <p:column sortBy="#{fnBBranch.branchAddress.houseNumber}" filterBy="#{fnBBranch.branchAddress.houseNumber}">
                                    <f:facet name="header">
                                        <h:outputText value="Corporate name" />
                                    </f:facet>
                                    <h:outputText value="#{fnBBranch.branchAddress.houseNumber}" />
                                </p:column>
                            </p:dataTable>
                        </p:tab>
                        <p:tab title="Event Branch">

                        </p:tab> 
                    </p:accordionPanel> 
                </p:panel>
            </h:form>
    </ui:define>
</ui:composition>